Repository navigation
Fix #5505: Incorrect masking of hydrogen bond donors in DSSP - #5506
BradyAJohnston wants to merge 6 commits into
Conversation
Documentation build overview
10 files changed ·
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## enh-dssp-construction #5506 +/- ##
======================================================
Coverage 93.92% 93.92%
======================================================
Files 184 184
Lines 22673 22678 +5
Branches 3222 3222
======================================================
+ Hits 21295 21301 +6
Misses 917 917
+ Partials 461 460 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1ba1d06 to
59b50f0
Compare
| residue more than 2.5 Å from the C atom of the residue before it: another | ||
| chain or a gap) as DSSP does: they are no hydrogen bond donors and are | ||
| not checked for a single hydrogen with ``guess_hydrogens=False``, which | ||
| rejected every system with more than one chain (Issue #XXXX, PR #XXXX) |
There was a problem hiding this comment.
fill in PR/issue and move to 2.12.0 section
| is_pro = calphas.resnames[1:n] == "PRO" | ||
| counts = n_hydrogens[1:n] | ||
| wrong = np.flatnonzero(np.where(is_pro, counts != 0, counts != 1)) | ||
| is_pro = calphas.resnames[:n] == "PRO" |
There was a problem hiding this comment.
With definition of self._chain_start it makes sense to now not exclude the initial residue anymore. ✅
| np.testing.assert_equal(result[:, :n_residues], expected) | ||
| np.testing.assert_equal(result[:, n_residues:], expected) |
There was a problem hiding this comment.
Did this test that both copies give the same results fail before this fix?
|
@BradyAJohnston apologies, I pressed a button on GH "rebase stack" and hoped it would "just be fine" or at least that I could quickly fix up any conflicts but it turns out one has to use |
orbeckst
left a comment
There was a problem hiding this comment.
With CHANGELOG/release number edits, lgtm.
Fixes #5505, stacked on #5504
This doesn't change how MDA behaves compared to
pydsspfor any of our existing test data, but that's only because we don't have multiple chains or a gap in the backbone.pydsspexpects only a single chain, and already fails to assign secondary structure across periodic boundaries which we now account for. Something that isn't done here is that the original DSSP doesn't assign SS across a break in the backbone but we still technically allow it if the other boxes are ticked.Changes made in this Pull Request:
guess_hydrogensno longer fails and if there is a break in the chain the first residues for each segment are masked as not being donors.LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no
PR Checklist
package/CHANGELOGfile updated?package/AUTHORS? (If it is not, add it!)Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.